Population class extension: version_info module
File containing the class object containing the functions to handle binary_c version info.
This class will be used to extend the population object
NOTE: could these functions not just be normal functions rather than class methods? I see hardly any use of the self
- class binarycpython.utils.population_extensions.version_info.version_info(**kwargs)[source]
Bases:
object
Class object containing the functions to handle binary_c version info.
This class will be used to extend the population object
- minimum_stellar_mass()[source]
Function to return the minimum stellar mass (in Msun) from binary_c.
- parse_binary_c_version_info(version_info_string)[source]
Function that parses the binary_c version info. Long function with a lot of branches
- Parameters
version_info_string (
str
) – raw output of version_info call to binary_c- Returns
‘isotopes’ for isotope info, ‘argpairs’ for argument pair info (TODO: explain), ‘ensembles’ for ensemble settings/info, ‘macros’ for macros, ‘elements’ for atomic element info, ‘DTlimit’ for (TODO: explain), ‘nucleosynthesis_sources’ for nucleosynthesis sources, and ‘miscellaneous’ for all those that were not caught by the previous groups. ‘git_branch’, ‘git_build’, ‘revision’ and ‘email’ are also keys, but its clear what those contain.
- Return type
Parsed version of the version info, which is a dictionary containing the keys
- return_binary_c_version_info(parsed=True)[source]
Function that returns the version information of binary_c. This function calls the function _binary_c_bindings.return_version_info()
- Parameters
parsed (
bool
) – Boolean flag whether to parse the version_info output of binary_c. default = False- Return type
Union
[str
,dict
]- Returns
Either the raw string of binary_c or a parsed version of this in the form of a nested dictionary